package org.linlinjava.litemall.db.dao;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallSearchHistory;
import org.linlinjava.litemall.db.vo.SearchHistoryVo;

import java.util.List;

/**
 * @author Administrator
 */
public interface SearchHistoryMapper {

    /**
     * 查询用户搜索的高频关键词
     * @param uid
     * @param num
     * @return
     */
    List<SearchHistoryVo> queryByUidWithOrder(@Param("uid") Integer uid, @Param("num") Integer num);

    /**
     * 查询某个人搜索记录前五条
     * @param userId
     * @param limit
     * @return
     */
    List<LitemallSearchHistory> queryByUserIdAndLimit(@Param("userId") Integer userId,@Param("limit") Integer limit);


}
